Skip to content

feat(FR-2891): move resource group to deployment metadata, wire new ModelReplica status fields#7407

Merged
graphite-app[bot] merged 1 commit into
mainfrom
05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui
May 15, 2026
Merged

feat(FR-2891): move resource group to deployment metadata, wire new ModelReplica status fields#7407
graphite-app[bot] merged 1 commit into
mainfrom
05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui

Conversation

@agatha197
Copy link
Copy Markdown
Contributor

@agatha197 agatha197 commented May 13, 2026

Resolves #7406 (FR-2891)

Summary

Schema

  • ModelDeploymentMetadata gains resourceGroupName: String! and resourceGroup: ResourceGroup (DataLoader-resolved). Resource group now lives at the deployment level rather than per revision.
  • ResourceConfigInput.resourceGroup removed and ModelDeploymentMetadataInput.resourceGroup added.
  • AddRevisionInputclusterConfig / resourceConfig / image / modelRuntimeConfig become nullable so preset-driven revisions can submit minimal payloads.
  • AddRevisionInput.name / CreateRevisionInput.name removed.
  • ModelReplica gains status: ReplicaStatus!, trafficStatus: TrafficStatus!, healthStatus: ReplicaHealthStatus!; new ReplicaHealthStatus enum (NOT_CHECKED | HEALTHY | UNHEALTHY | DEGRADED).
  • ModelMountConfig.subpath and ExtraVFolderMountInfoGQL.subpath added (intentionally not surfaced in UI — deferred to a follow-up).
  • Query.inferenceRuntimeConfigs / inferenceRuntimeConfig deprecated; ModelRuntimeConfigInput.inferenceRuntimeConfig removed. WebUI no longer surfaces these.

UI — deployment creation / edit

  • DeploymentSettingModal collects the resource group via BAIProjectResourceGroupSelect; edit mode renders the current RG as read-only text.
  • DeploymentAddRevisionModal hides the resource group selector (revisions inherit the RG from the deployment via hideResourceGroupFormItem on ResourceAllocationFormItems). The hidden picker still drives ResourcePresetSelect filtering.
  • Preset mode in DeploymentAddRevisionModal calls addModelRevision(revisionPresetId, modelMountConfig, options.autoActivate) instead of deployVfolderV2 — the modal is only opened from an existing deployment, so it must add a revision, not create a new deployment.
  • Dead commitDeploy / DeploymentAddRevisionModalDeployMutation block left over after the FR-2862 preset-mode refactor is removed; isSubmitting now collapses to isAddInFlight.

UI — preset detail modal (architecture)

  • DeploymentPresetDetailModal switched to useFragment — the modal now accepts presetFrgmt: DeploymentPresetDetailModalFragment$key | null | undefined instead of owning its own useLazyLoadQuery. The previous shell-vs-body split is collapsed back into a single component because useFragment(query, null) tolerates the null input that the close-animation lifecycle produces.
  • List-query callers (ModelCardDeployModal, VFolderDeployModal) spread ...DeploymentPresetDetailModalFragment on the existing availablePresets / deploymentRevisionPresets edge nodes. No extra fetch — when the user opens the detail view, the matching edge node is handed to the modal as presetFrgmt.
  • Paginated-select caller (DeploymentAddRevisionModal) cannot list-spread because BAIAvailablePresetSelect paginates independently. A small inner component (PresetDetailLoader) fires a singular deploymentRevisionPreset(id:) query when invoked and forwards the fragment ref to the modal.
  • This is the team-approved pattern per Seungwon's review feedback (Teams thread, FR-2862 follow-up).

UI — deployment detail

  • Basic Information now shows Resource Group sourced from metadata.resourceGroupName; Name / Deployment ID rows are split for clarity.
  • Deployment list gains a Deployment ID column.
  • Replicas tab:
    • New Status column powered by ModelReplica.status (PROVISIONING / RUNNING / TERMINATING / TERMINATED / FAILED_TO_START) via ReplicaStatusTag. The earlier placeholder is removed.
    • Health Status column source moved from livenessStatus → new healthStatus field.
    • Traffic Status column (renamed from "Active Pool") source moved from activenessStatus → new trafficStatus field; uses BAITag with success/default semantic colors.
    • Replica ID column is sortable; default sort is -createdAt applied at query-build time (no URL key written), following the ComputeSessionListPage pattern.
    • Filter properties include both status and trafficStatus.
    • Session column resolves through sessionV2 (BA-5838 workaround); Revision column opens DeploymentRevisionDetailDrawer.
  • ReplicaStatusTag extends its enum to cover RUNNING and FAILED_TO_START (with localized labels / tooltips across 22 locales).

Test plan

  • Create a new deployment from DeploymentSettingModal; verify the resource group selector is required and autoSelectDefault picks the project default.
  • Open DeploymentSettingModal in edit mode on an existing deployment; verify the current resource group renders as read-only text.
  • On a deployment detail page, open Add Revision → Custom mode; verify the resource group form item is hidden but `ResourcePresetSelect` still filters by the deployment's RG.
  • In Add Revision → Preset mode, pick a preset and submit; verify a new revision is added to the current deployment (not a new deployment) and the modal closes without navigating away.
  • Toggle `Auto activate` in both Preset and Custom modes; verify `AddRevisionOptions.autoActivate` is forwarded in both branches.
  • Open the preset (i) detail modal from ModelCardDeployModal, VFolderDeployModal, and DeploymentAddRevisionModal; verify each shows the right preset details and closes cleanly without any "preset not found" flash during the close animation.
  • In DeploymentAddRevisionModal (Preset mode), scroll the preset selector past the first page, select a preset from a later page, then open the detail modal; verify the singular deploymentRevisionPreset(id:) query resolves and the detail renders.
  • Open Deployments list; verify the new Deployment ID column renders BAIId with copy affordance.
  • On deployment detail → Replicas tab, verify the three Status / Health Status / Traffic Status columns render real values from the new schema fields.
  • Open the page with no `?rOrder=` in the URL; verify replicas are sorted by `createdAt` descending and the `Replica ID` header has no sort arrow initially.
  • Click `Created At` header; verify ascend → descend → none cycle works and is reflected in URL + server query.
  • Click `Replica ID` header; verify it sorts and the URL `?rOrder=` updates.
  • Apply the `status` filter and the new `trafficStatus` filter; verify both narrow the table.
  • Open the Revision link in a replica row; verify `DeploymentRevisionDetailDrawer` opens with the revision detail.
  • Trigger replicas in `FAILED_TO_START` and `RUNNING` states; verify `ReplicaStatusTag` renders the right color/label/tooltip in en/ko.

Copy link
Copy Markdown
Contributor Author

agatha197 commented May 13, 2026

@agatha197 agatha197 marked this pull request as ready for review May 13, 2026 09:19
Copilot AI review requested due to automatic review settings May 13, 2026 09:19
@agatha197 agatha197 marked this pull request as draft May 13, 2026 09:19
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

Coverage Report for react-coverage (./react)

Status Category Percentage Covered / Total
🔵 Lines 6.52% 1785 / 27365
🔵 Statements 5.36% 1980 / 36897
🔵 Functions 5.25% 296 / 5630
🔵 Branches 3.74% 1293 / 34496
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/components/AdminDeploymentPresetNodes.tsx 0% 0% 0% 0% 30-217
react/src/components/AdminDeploymentPresetReviewSummary.tsx 0% 0% 0% 0% 20-422
react/src/components/AdminDeploymentPresetSettingPageContent.tsx 0% 0% 0% 0% 98-630
react/src/components/AutoScalingRuleEditorModal.tsx 0% 0% 0% 0% 74-862
react/src/components/AutoScalingRuleList.tsx 0% 0% 0% 0% 59-433
react/src/components/DeploymentAddRevisionModal.tsx 0% 0% 0% 0% 129-1667
react/src/components/DeploymentConfigurationSection.tsx 0% 0% 0% 0% 73-319
react/src/components/DeploymentList.tsx 0% 0% 0% 0% 52-425
react/src/components/DeploymentPresetDetailModal.tsx 0% 0% 0% 0% 31-198
react/src/components/DeploymentReplicasTab.tsx 0% 0% 0% 0% 43-463
react/src/components/DeploymentRevisionDetail.tsx 0% 0% 0% 0% 28-338
react/src/components/DeploymentRevisionHistoryTab.tsx 0% 0% 0% 0% 64-678
react/src/components/DeploymentSettingModal.tsx 0% 0% 0% 0% 47-230
react/src/components/ModelCardDeployModal.tsx 0% 0% 0% 0% 55-104
react/src/components/ModelCardDrawer.tsx 0% 0% 0% 0% 45-310
react/src/components/ReplicaStatusTag.tsx 0% 0% 0% 0% 39-96
react/src/components/VFolderDeployModal.tsx 0% 0% 0% 0% 52-113
react/src/components/VFolderNodes.tsx 0% 0% 0% 0% 51-699
react/src/components/VFolderNodesV2.tsx 0% 0% 0% 0% 61-368
react/src/components/SessionFormItems/ResourceAllocationFormItems.tsx 12.64% 7.91% 12.67% 12.4% 62, 126-1514, 1576
react/src/hooks/hooksUsingRelay.tsx 16.66% 0% 0% 18.18% 25-49, 57-99, 117-131, 143-162
react/src/pages/DeploymentDetailPage.tsx 0% 0% 0% 0% 35-142
react/src/pages/DeploymentListPage.tsx 0% 0% 0% 0% 38-58
Generated in workflow #764 for commit e2b6b31 by the Vitest Coverage Report Action

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns the WebUI with the serving schema change that makes resource group a deployment-level property (rather than revision-level), while refining several deployment UIs (detail layout, list columns, replicas table) and expanding replica-status localization.

Changes:

  • Update GraphQL schema and revision flows so revisions can inherit the deployment resource group; preset-driven revisions can omit cluster/resource/image/runtime configs.
  • Refine deployment UIs: separate Deployment Name vs Deployment ID, merge current revision “Revision (ID)”, add Deployment ID column in the list, and enhance Replicas tab with Session (via sessionV2) and Revision link drawer.
  • Add replica lifecycle statuses (WARMING_UP, RUNNING, FAILED_TO_START) to ReplicaStatusTag and update i18n strings across locales.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
resources/i18n/de.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/el.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/en.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/es.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/fi.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/fr.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/id.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/it.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/ja.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/ko.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/mn.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/ms.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/pl.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/pt.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/pt-BR.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/ru.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/th.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/tr.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/vi.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/zh-CN.json Remove NameAndID; add/adjust replica status strings/tooltips.
resources/i18n/zh-TW.json Remove NameAndID; add/adjust replica status strings/tooltips.
react/src/components/SessionFormItems/ResourceAllocationFormItems.tsx Add hideResourceGroupFormItem to support “hidden but mounted” RG selection in revision flow.
react/src/components/ReplicaStatusTag.tsx Add new statuses + tooltip keys; show spinner icon for WARMING_UP.
react/src/components/DeploymentSettingModal.tsx Collect RG on create and show read-only RG on edit; query current revision RG name.
react/src/components/DeploymentRevisionDetail.tsx Add mergeRevisionInfo option to render “Revision (ID)” combined row.
react/src/components/DeploymentReplicasTab.tsx Add Status placeholder column, Session via sessionV2, Revision drawer link; add status filter options.
react/src/components/DeploymentList.tsx Add Deployment ID column and enable copy for name cell.
react/src/components/DeploymentConfigurationSection.tsx Split “Name” and “Deployment ID” rows; merge revision info in current revision view.
react/src/components/DeploymentAddRevisionModal.tsx Remove RG picker; preset mode now adds a revision (not deploy/create); keep hidden RG state for preset filtering.
data/schema.graphql Move RG to ModelDeploymentMetadataInput; remove ResourceConfigInput.resourceGroup; make revision configs nullable in AddRevisionInput.
Comments suppressed due to low confidence (1)

react/src/components/DeploymentReplicasTab.tsx:229

  • WARMING_UP is included in the status filter options even though the comment notes the backend filter currently rejects it. Selecting this option will generate a ReplicaFilter.status = WARMING_UP query and likely surface an API error / empty state. Remove this option until the backend accepts it, or guard filter serialization so unsupported enum values are not sent.
  const replicaStatusOptions = [
    { label: t('replicaStatus.Provisioning'), value: 'PROVISIONING' },
    // TODO(needs-backend): include `WARMING_UP` in the filter options once
    // the `ReplicaStatus` enum exposes it. Listed here for UI completeness
    // but the backend filter currently rejects it.
    { label: t('replicaStatus.WarmingUp'), value: 'WARMING_UP' },
    { label: t('replicaStatus.Running'), value: 'RUNNING' },
    { label: t('replicaStatus.Terminating'), value: 'TERMINATING' },
    { label: t('replicaStatus.Terminated'), value: 'TERMINATED' },
    { label: t('replicaStatus.FailedToStart'), value: 'FAILED_TO_START' },
  ];

Comment thread react/src/components/DeploymentSettingModal.tsx
Comment thread react/src/components/DeploymentSettingModal.tsx Outdated
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui branch from 54c0701 to 9d37418 Compare May 13, 2026 13:42
@agatha197
Copy link
Copy Markdown
Contributor Author

Addressed feedback from @copilot-pull-request-reviewer:

  • metadata.resourceGroup missing on create — fixed; values.resourceGroup is now forwarded into ModelDeploymentMetadataInput.resourceGroup.
  • Blank Resource Group row in edit mode — fixed; renders a secondary em-dash fallback when the value is unavailable.
  • WARMING_UP filter option (suppressed comment) — keeping it for now. Backend will expose WARMING_UP on ReplicaFilter.status shortly; the TODO marker stays so we don't forget to remove it if the plan changes.

Also added a Resource Group row in the deployment overview Descriptions so the value is visible alongside Domain / Project.

@agatha197 agatha197 force-pushed the 05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui branch 2 times, most recently from cec75b6 to 40756c0 Compare May 14, 2026 04:14
@agatha197 agatha197 force-pushed the 05-13-refactor_fr-2862_merge_deployment_content_components_into_modals branch from 6afc3c2 to 1909c9e Compare May 14, 2026 05:21
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui branch 5 times, most recently from ffd3228 to 057a90e Compare May 14, 2026 07:03
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui branch from fead57c to 5a68a98 Compare May 14, 2026 08:05
@agatha197 agatha197 marked this pull request as ready for review May 14, 2026 08:10
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui branch 3 times, most recently from 918cbb1 to c7aa965 Compare May 14, 2026 09:20
@agatha197 agatha197 force-pushed the 05-13-refactor_fr-2862_merge_deployment_content_components_into_modals branch from 132ffac to a5fa2af Compare May 14, 2026 10:00
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui branch 3 times, most recently from 0928392 to 5bc69d5 Compare May 15, 2026 03:59
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)

Status Category Percentage Covered / Total
🔵 Lines 8.01% 362 / 4518
🔵 Statements 7.16% 411 / 5740
🔵 Functions 8.9% 94 / 1055
🔵 Branches 6.37% 362 / 5681
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/backend.ai-ui/src/components/BAISelect.tsx 0% 0% 0% 0% 17-245
Generated in workflow #764 for commit e2b6b31 by the Vitest Coverage Report Action

@agatha197 agatha197 force-pushed the 05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui branch 2 times, most recently from e7d01c1 to 473f3fb Compare May 15, 2026 04:53
@agatha197 agatha197 force-pushed the 05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui branch 3 times, most recently from dc98ec8 to e2b6b31 Compare May 15, 2026 07:45
@agatha197 agatha197 force-pushed the 05-13-refactor_fr-2862_merge_deployment_content_components_into_modals branch from a5fa2af to 1f3f171 Compare May 15, 2026 07:45
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented May 15, 2026

Merge activity

…odelReplica status fields (#7407)

Resolves #7406 ([FR-2891](https://lablup.atlassian.net/browse/FR-2891))

## Summary

### Schema
- **`ModelDeploymentMetadata`** gains `resourceGroupName: String!` and `resourceGroup: ResourceGroup` (DataLoader-resolved). Resource group now lives at the deployment level rather than per revision.
- **`ResourceConfigInput.resourceGroup` removed** and **`ModelDeploymentMetadataInput.resourceGroup`** added.
- **`AddRevisionInput`** — `clusterConfig` / `resourceConfig` / `image` / `modelRuntimeConfig` become nullable so preset-driven revisions can submit minimal payloads.
- **`AddRevisionInput.name` / `CreateRevisionInput.name` removed**.
- **`ModelReplica`** gains `status: ReplicaStatus!`, `trafficStatus: TrafficStatus!`, `healthStatus: ReplicaHealthStatus!`; new `ReplicaHealthStatus` enum (`NOT_CHECKED | HEALTHY | UNHEALTHY | DEGRADED`).
- **`ModelMountConfig.subpath`** and **`ExtraVFolderMountInfoGQL.subpath`** added (intentionally not surfaced in UI — deferred to a follow-up).
- **`Query.inferenceRuntimeConfigs` / `inferenceRuntimeConfig`** deprecated; **`ModelRuntimeConfigInput.inferenceRuntimeConfig` removed**. WebUI no longer surfaces these.

### UI — deployment creation / edit
- **`DeploymentSettingModal`** collects the resource group via `BAIProjectResourceGroupSelect`; edit mode renders the current RG as read-only text.
- **`DeploymentAddRevisionModal`** hides the resource group selector (revisions inherit the RG from the deployment via `hideResourceGroupFormItem` on `ResourceAllocationFormItems`). The hidden picker still drives `ResourcePresetSelect` filtering.
- **Preset mode** in `DeploymentAddRevisionModal` calls `addModelRevision(revisionPresetId, modelMountConfig, options.autoActivate)` instead of `deployVfolderV2` — the modal is only opened from an existing deployment, so it must add a revision, not create a new deployment.
- Dead `commitDeploy` / `DeploymentAddRevisionModalDeployMutation` block left over after the FR-2862 preset-mode refactor is removed; `isSubmitting` now collapses to `isAddInFlight`.

### UI — preset detail modal (architecture)
- **`DeploymentPresetDetailModal` switched to `useFragment`** — the modal now accepts `presetFrgmt: DeploymentPresetDetailModalFragment$key | null | undefined` instead of owning its own `useLazyLoadQuery`. The previous shell-vs-body split is collapsed back into a single component because `useFragment(query, null)` tolerates the null input that the close-animation lifecycle produces.
- **List-query callers (`ModelCardDeployModal`, `VFolderDeployModal`)** spread `...DeploymentPresetDetailModalFragment` on the existing `availablePresets` / `deploymentRevisionPresets` edge nodes. No extra fetch — when the user opens the detail view, the matching edge node is handed to the modal as `presetFrgmt`.
- **Paginated-select caller (`DeploymentAddRevisionModal`)** cannot list-spread because `BAIAvailablePresetSelect` paginates independently. A small inner component (`PresetDetailLoader`) fires a singular `deploymentRevisionPreset(id:)` query when invoked and forwards the fragment ref to the modal.
- This is the team-approved pattern per Seungwon's review feedback (Teams thread, FR-2862 follow-up).

### UI — deployment detail
- **Basic Information** now shows Resource Group sourced from `metadata.resourceGroupName`; Name / Deployment ID rows are split for clarity.
- **Deployment list** gains a Deployment ID column.
- **Replicas tab**:
  - New **Status** column powered by `ModelReplica.status` (`PROVISIONING / RUNNING / TERMINATING / TERMINATED / FAILED_TO_START`) via `ReplicaStatusTag`. The earlier placeholder is removed.
  - **Health Status** column source moved from `livenessStatus` → new `healthStatus` field.
  - **Traffic Status** column (renamed from \"Active Pool\") source moved from `activenessStatus` → new `trafficStatus` field; uses `BAITag` with `success`/`default` semantic colors.
  - **Replica ID** column is sortable; default sort is `-createdAt` applied at query-build time (no URL key written), following the `ComputeSessionListPage` pattern.
  - Filter properties include both `status` and `trafficStatus`.
  - `Session` column resolves through `sessionV2` (BA-5838 workaround); `Revision` column opens `DeploymentRevisionDetailDrawer`.
- **`ReplicaStatusTag`** extends its enum to cover `RUNNING` and `FAILED_TO_START` (with localized labels / tooltips across 22 locales).

## Test plan
- [ ] Create a new deployment from `DeploymentSettingModal`; verify the resource group selector is required and `autoSelectDefault` picks the project default.
- [ ] Open `DeploymentSettingModal` in edit mode on an existing deployment; verify the current resource group renders as read-only text.
- [ ] On a deployment detail page, open Add Revision → Custom mode; verify the resource group form item is hidden but \`ResourcePresetSelect\` still filters by the deployment's RG.
- [ ] In Add Revision → Preset mode, pick a preset and submit; verify a new revision is added to the current deployment (not a new deployment) and the modal closes without navigating away.
- [ ] Toggle \`Auto activate\` in both Preset and Custom modes; verify \`AddRevisionOptions.autoActivate\` is forwarded in both branches.
- [ ] Open the preset (i) detail modal from `ModelCardDeployModal`, `VFolderDeployModal`, and `DeploymentAddRevisionModal`; verify each shows the right preset details and closes cleanly without any \"preset not found\" flash during the close animation.
- [ ] In `DeploymentAddRevisionModal` (Preset mode), scroll the preset selector past the first page, select a preset from a later page, then open the detail modal; verify the singular `deploymentRevisionPreset(id:)` query resolves and the detail renders.
- [ ] Open Deployments list; verify the new Deployment ID column renders BAIId with copy affordance.
- [ ] On deployment detail → Replicas tab, verify the three Status / Health Status / Traffic Status columns render real values from the new schema fields.
- [ ] Open the page with no \`?rOrder=\` in the URL; verify replicas are sorted by \`createdAt\` descending and the \`Replica ID\` header has no sort arrow initially.
- [ ] Click \`Created At\` header; verify ascend → descend → none cycle works and is reflected in URL + server query.
- [ ] Click \`Replica ID\` header; verify it sorts and the URL \`?rOrder=\` updates.
- [ ] Apply the \`status\` filter and the new \`trafficStatus\` filter; verify both narrow the table.
- [ ] Open the Revision link in a replica row; verify \`DeploymentRevisionDetailDrawer\` opens with the revision detail.
- [ ] Trigger replicas in \`FAILED_TO_START\` and \`RUNNING\` states; verify \`ReplicaStatusTag\` renders the right color/label/tooltip in en/ko.

[FR-2891]: https://lablup.atlassian.net/browse/FR-2891?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app Bot force-pushed the 05-13-refactor_fr-2862_merge_deployment_content_components_into_modals branch from 1f3f171 to 8a298f1 Compare May 15, 2026 07:59
@graphite-app graphite-app Bot force-pushed the 05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui branch from e2b6b31 to aaff679 Compare May 15, 2026 08:00
graphite-app Bot pushed a commit that referenced this pull request May 15, 2026
…ivate / auto-activate (#7428)

Resolves #7427(FR-2901)

Stacked on #7407.

## Summary

After mutations that change a deployment's `currentRevisionId` / `deployingRevisionId`, the Relay store's deployment record can fall out of sync with the server, causing the row tags in the revision history table and the Configuration Section's "current / deploying" panels to drift apart from what the server thinks. Two specific gaps were addressed:

- **`activateDeploymentRevision` (Revision History → Deploy)** — Mutation response previously returned only `deployment { id, currentRevisionId, currentRevision { id } }`. Extended to include `deployingRevisionId` and `...DeploymentRevisionDetail_revision` fragment on both `currentRevision` and `deployingRevision @SInCE(version: "26.4.3")`, so the normalized deployment record updates atomically. Consumers (`DeploymentDetailPage`, `DeploymentConfigurationSection`, `DeploymentRevisionHistoryTab` row tags) all share the same Relay store record and re-render on the next render pass.

- **`addModelRevision` (Add Revision modal, both Preset and Custom modes)** — Now that the backend exposes `ModelRevision.deployment` (lablup/backend.ai#11631 / BA-6056), the mutation reaches into `revision.deployment @SInCE(version: "26.4.4")` and selects `currentRevisionId`, `deployingRevisionId`, `currentRevision`, `deployingRevision`, so the deployment node is updated unconditionally on every revision add. No `autoActivate` branching — Relay normalizes the shared deployment node either way.
  - The previous client-side `fetchQuery` workaround helper is removed.
  - The `revision` selection itself was reduced to `id` + `...DeploymentRevisionDetail_revision`. The previously inlined fields (`resourceConfig.resourceOpts`, `modelRuntimeConfig.runtimeVariantId`, `modelDefinition.models[].service.preStartActions / shell / healthCheck.expectedStatusCode`, etc.) were dead selections — none of the response handlers read them, and the actual consumers (`AdminDeploymentPresetSettingPageContent`, `AdminDeploymentPresetModelConfigItem`, `DeploymentPresetDetailModal`) have their own queries.

- **`data/schema.graphql`** — Regenerated to add `ModelRevision.deploymentId: ID!` and `ModelRevision.deployment: ModelDeployment` per the merged backend PR.

## Test plan

- [ ] Open a deployment detail with multiple revisions in the Revision History tab. Click **Deploy** on a non-current revision → confirm the "Current" / "배포중" row tags AND the Configuration Section's `currentRevision` / `deployingRevision` panels both update without a manual refresh.
- [ ] From the same page open **Add Revision** modal in either Preset or Custom mode with **Auto activate ON** → submit → modal closes, success toast shows. Verify the Configuration Section moves to "deploying" state and the new revision appears as `deployingRevision` without a manual refresh.
- [ ] Same flow with **Auto activate OFF** → deployment record is still refreshed by the mutation (no autoActivate branching). `deployingRevisionId` typically stays unchanged on the server side; UI should show the new revision in history without an orphan "deploying" state.
- [ ] Backend lifecycle: leave the page idle while a deploying revision becomes current. The 5s `useInterval` polling in `DeploymentConfigurationSection` continues to work because `deployingRevision` is correctly populated immediately after the mutation.

## Backend dependency

Requires backend manager with [lablup/backend.ai#11631](lablup/backend.ai#11631) (BA-6056) — `ModelRevision.deployment` / `ModelRevision.deploymentId`. Older managers without the field will see the `@since(version: "26.4.4")` directive strip the field at request time, falling back to no auto-update for `addModelRevision` (the activate path is unaffected).
Base automatically changed from 05-13-refactor_fr-2862_merge_deployment_content_components_into_modals to main May 15, 2026 08:08
@graphite-app graphite-app Bot merged commit aaff679 into main May 15, 2026
3 of 4 checks passed
@graphite-app graphite-app Bot deleted the 05-13-feat_fr-2891_move_resource_group_to_deployment-level_metadata_and_refine_deployment_detail_ui branch May 15, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:i18n Localization area:ux UI / UX issue. size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move resource group to deployment-level metadata and refine deployment detail UI

3 participants